
function  Parent(name, actions) {
  this.name = name
  this.actions = actions
  this.eat = function () {

  }
}
Parent.prototype.getName = function(){
  console.log(this.name)
}

function Child(id,name,actions) {
  Parent.call(this,name,actions)
  this.id = id
}

const child1 = new Child(1,'lulu',['1111'])
const child2 = new Child(2,'xiaoming',['4444','555'])

// child1.actions.push('333')
console.log(child1.actions)
console.log(child2.actions)
console.log(child1.eat === child2.eat)

// child1.getName()